export default [
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './user/login'
      },
      {
        name: 'ChangePassword',
        path: '/user/ChangePassword',
        component: './user/ChangePassword'
      },
      {
        name: 'PasswordStatuspage',
        path: '/user/PasswordStatuspage',
        component: './user/PasswordStatuspage'
      },
      {
        name: 'notice',
        path: '/user',
        component: './user/Notice'
      },
      {
        component: './404'
      }
    ]
  },
  {
    path: '/',
    component: '../layouts/SecurityLayout',
    routes: [
      {
        path: '/',
        component: '../layouts/BasicLayout',
        // authority: ['admin', 'user'],
        routes: [
          // dashboard
          { path: '/', redirect: '/dashboard' },
          // { path: '/', redirect: '/dashboard' }, // 0609 首页新开发报表（待联调）
          // 首页
          {
            path: '/Index',
            name: 'Index',
            icon: 'bank',
            component: './Index'
          },
          {
            path: '/dashboard',
            name: 'Dashboard',
            icon: 'pie-chart',
            component: './Dashboard',
            authority: ['店铺管理']
          },
          // 店铺管理
          {
            path: '/shop',
            name: 'shop',
            icon: 'shop',
            authority: ['店铺管理'],
            routes: [
              {
                path: '/shop/info',
                name: 'info',
                component: './Shop/Info'
              },
              {
                path: '/shop/info/addInfo',
                name: 'addInfo',
                component: './Shop/AddInfo',
                hideInMenu: true
              },
              {
                path: '/shop/info/Agreement',
                name: 'Agreement',
                component: './Shop/Agreement',
                hideInMenu: true
              }
            ]
          },
          //模板管理
          {
            path: '/template',
            name: 'template',
            icon: 'tool',
            authority: ['模板管理'], 
            routes: [
              {
                path: '/template/list',
                name: 'list',
                component: './Template/List/index',
                authority: ['模板列表']
              },
              // {
              //   path: '/template/list',
              //   name: 'list',
              //   component: './Template/List',
              //   authority: ['模板列表']
              // },
              {
                path: '/template/list/detail/:id?',
                name: 'detail',
                component: './Template/Detail',
                hideInMenu: true
              },
            ]
          },
          // 商品管理
          {
            path: '/goods',
            name: 'goods',
            icon: 'shopping',
            authority: ['商品管理'],
            routes: [
              // 所有商品
              {
                path: '/goods/list',
                name: 'list',
                component: './Goods/List',
                authority: ['商品列表']
              },
              {
                path: '/goods/Purchase',
                name: 'Purchase',
                component: './Goods/Purchase',
                authority: ['商品列表']
              },
              {
                path: '/goods/list/detail/:id?',
                name: 'detail',
                component: './Goods/Detail',
                hideInMenu: true
              },

              {
                path: '/goods/Purchase/PurchaseDetail/:id?',
                name: 'PurchaseDetail',
                component: './Goods/PurchaseDetail',
                hideInMenu: true
              },

              // 租赁规则模板
              // {
              //   path: '/goods/rentRuleList',
              //   name: 'rentRuleList',
              //   component: './Goods/RentRuleList',
              // },
              // // 租赁规则模板详情
              // {
              //   path: '/goods/rentRuleList/rentRuleDetail/:id?',
              //   name: 'rentRuleDetail',
              //   component: './Goods/RentRuleDetail',
              //   hideInMenu: true,
              // },
              // // 赔偿规则模板
              // {
              //   path: '/goods/compensateList',
              //   name: 'compensateList',
              //   component: './Goods/CompensateList',
              // },
              // {
              //   path: '/goods/compensateList/compensateDetail/:id?',
              //   name: 'compensateDetail',
              //   component: './Goods/CompensateDetail',
              //   hideInMenu: true,
              // },
              // 归还地址
              {
                path: '/goods/givebackList',
                name: 'givebackList',
                component: './Goods/GivebackList',
                authority: ['归还地址']
              },
              // 增值服务
              {
                path: '/goods/addedServices',
                name: 'addedServices',
                component: './Shop/AddedServices',
                authority: ['增值服务']
              },
              {
                path: '/goods/addedServices/detail/:id?',
                name: 'serviceDetail',
                component: './Shop/ServiceDetail',
                hideInMenu: true
              }
            ]
          },

          // 订单
          {
            path: '/Order',
            name: 'Order',
            icon: 'audit',
            hideInMenu: false,
            authority: ['订单管理'],
            routes: [
              {
                path: '/Order/HomePage',
                component: './Order/HomePage',
                hideInMenu: false,
                name: 'HomePage',
                authority: ['订单列表']
              },
              {
                path: '/Order/HomePage/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              // {
              //   path: '/Order/Close',
              //   component: './Order/Close',
              //   hideInMenu: false,
              //   name: 'Close',
              // },

              {
                path: '/Order/Expires',
                component: './Order/Expires',
                hideInMenu: false,
                name: 'Expires',
                authority: ['即将到期订单']
              },
              {
                path: '/Order/Expires/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/BeOverdue',
                component: './Order/BeOverdue',
                hideInMenu: false,
                name: 'BeOverdue',
                authority: ['逾期订单']
              },
              {
                path: '/Order/OverdueNoRetrun',
                component: './Order/OverdueNoRetrun',
                hideInMenu: false,
                name: 'OverdueNoRetrun',
                authority: ['到期未归还订单']
              },
              {
                path: '/Order/BeOverdue/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/OverdueNoRetrun/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/BuyOut',
                component: './Order/BuyOut',
                hideInMenu: false,
                name: 'BuyOut',
                authority: ['买断订单']
              },
              {
                path: '/Order/BuyOut/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },

              {
                path: '/Order/RentRenewal',
                component: './Order/RentRenewal',
                hideInMenu: false,
                name: 'RentRenewal',
                authority: ['续租订单']
              },
              {
                path: '/Order/RentRenewal/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/Purchase',
                component: './Order/Purchase',
                hideInMenu: false,
                name: 'Purchase',
                authority: ['续租订单']
              },
              {
                path: '/Order/Purchase/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              {
                path: '/Order/Details',
                component: './Order/Details',
                hideInMenu: true,
                name: 'Details'
              },
              // {
              //   path: '/Order/Details/:id',
              //   component: './Order/Details',
              //   hideInMenu: true,
              //   name: 'Details',
              // },
              {
                path: '/Order/BuyOut/BuyOutDetails',
                component: './Order/BuyOutDetails',
                hideInMenu: true,
                name: 'BuyOutDetails'
              },
              {
                path: '/Order/Purchase/PurchaseDetails',
                component: './Order/PurchaseDetails',
                hideInMenu: true,
                name: 'Details'
              },
              {
                component: './404'
              }
            ]
          },
           // 抢单大厅
          {
            path: '/task',
            name: 'Task',
            icon: 'RadarChartOutlined',
            hideInMenu: false,
            authority: ['接单中心'],
            routes: [
              {
                path: '/task/grab',
                component: './Task/Grab',
                hideInMenu: false,
                name: 'TaskGrab',
                authority: ['抢单大厅']
              },
              {
                path: '/task/index',
                component: './Task/Index',
                hideInMenu: false,
                name: 'TaskIndex',
                authority: ['我的订单']
              },
              {
                path: '/task/overdue',
                component: './Task/Overdue',
                hideInMenu: false,
                name: 'TaskOverdue',
                authority: ['逾期订单']
              },
              {
                path: '/task/salvaged',
                component: './Task/Salvaged',
                hideInMenu: false,
                name: 'TaskSalvaged',
                authority: ['捞单大厅']
              },
              {
                path: '/task/order/detail',
                component: './Order/Details',
                hideInMenu: true,
                name: 'TaskDetail'
              },
            ]
          },
          // 租赁记录统计
          {
            path: '/rent',
            name: 'Rent',
            icon: 'stock',
            hideInMenu: false,
            authority: ['数据统计'],
            routes: [
              {
                path: '/rent/count',
                component: './Rent/Count',
                hideInMenu: false,
                name: 'RentCount',
                authority: ['租赁记录列表']
              },
              {
                path: '/rent/collect',
                component: './Rent/Collect',
                hideInMenu: false,
                name: 'Collect',
                authority: ['数据汇总表']
              },
              {
                path: '/rent/member',
                component: './Rent/Member',
                hideInMenu: false,
                name: 'RentMember',
                authority: ['会员列表']
              },
              {
                path: '/rent/blackList',
                component: './Rent/BlackList',
                hideInMenu: false,
                name: 'BlackList',
                authority: ['会员列表']
              },
            ]
          },
          // 渠道管理
          {
            path: '/Channel',
            name: 'Channel',
            icon: 'fund',
            hideInMenu: false,
            authority: ['渠道管理'],
            routes: [
              {
                path: '/Channel/ChannelList',
                component: './Channel/ChannelList',
                hideInMenu: false,
                name: 'ChannelList',
                authority: ['渠道列表']
              },
              {
                path: '/Channel/ChannelCount',
                component: './Channel/ChannelCount',
                hideInMenu: false,
                name: 'ChannelCount',
                authority: ['渠道统计']
              },
              {
                path: '/Channel/ChannelUser',
                component: './Channel/ChannelUser',
                hideInMenu: false,
                name: 'ChannelUser',
                authority: ['渠道会员列表']
              }
            ]
          },

          // 营销管理
          // {
          //   path: '/coupons',
          //   icon: 'money-collect',
          //   name: 'coupons',
          //   authority: ['营销管理'],
          //   // authority: ['admin'],
          //   routes: [
          //     {
          //       path: '/coupons/list',
          //       name: 'list',
          //       component: './Coupons/List',
          //       authority: ['优惠券列表'],
          //     },
          //     {
          //       path: '/coupons/list/add',
          //       name: 'add',
          //       component: './Coupons/AddList',
          //       hideInMenu: true,
          //     },
          //     {
          //       path: '/coupons/Package',
          //       name: 'Package',
          //       component: './Coupons/Package',
          //       authority: ['大礼包'],
          //     },
          //     {
          //       hideInMenu: true,
          //       path: '/coupons/list/ToView',
          //       name: 'ToView',
          //       component: './Coupons/ToView',
          //     },
          //     {
          //       hideInMenu: true,
          //       path: '/coupons/TheEditorList',
          //       name: 'TheEditorList',
          //       component: './Coupons/TheEditorList',
          //     },
          //     {
          //       path: '/coupons/config',
          //       name: 'config',
          //       component: './Coupons/Config',
          //       authority: ['店铺营销图配置'],
          //     },
          //   ],
          // },

          // // 财务管理
          // {
          //   path: '/finance',
          //   name: 'finance',
          //   icon: 'shopping',
          //   authority: ['财务管理'],
          //   routes: [
          //     {
          //       path: '/finance/normal',
          //       name: 'normal',
          //       component: './Finance/normal',
          //       authority: ['常规账单'],
          //     },
          //     {
          //       path: '/finance/normal/detail/:id',
          //       name: 'detail',
          //       component: './Finance/orderDetail',
          //       hideInMenu: true,
          //       authority: ['常规账单'],
          //     },
          //
          //     {
          //       path: '/finance/buyout',
          //       name: 'buyout',
          //       component: './Finance/buyout',
          //       authority: ['买断账单'],
          //     },
          //     {
          //       path: '/finance/buyout/detail/:id',
          //       name: 'detail',
          //       component: './Finance/buyoutOrderDetail',
          //       hideInMenu: true,
          //     },
          //     {
          //       path: '/finance/purchase',
          //       name: 'purchase',
          //       component: './Finance/purchase',
          //       authority: ['买断账单'],
          //     },
          //     {
          //       path: '/finance/purchase/purchaseDetail/:id',
          //       name: 'purchaseDetail',
          //       component: './Finance/purchaseDetail',
          //       hideInMenu: true,
          //     },
          //   ],
          // },

          // 财务管理
          {
            path: '/finance',
            name: 'finance',
            icon: 'shopping',
            authority: ['财务管理'],
            routes: [
              {
                path: '/finance/bills',
                name: 'bills',
                component: './Finance/bills'
              }
              // {
              //   path: '/finance/normal',
              //   name: 'normal',
              //   component: './Finance/normal',
              //
              // },
              // {
              //   path: '/finance/normal/detail/:id',
              //   name: 'detail',
              //   component: './Finance/orderDetail',
              //   hideInMenu: true,
              //
              // },
              //
              // {
              //   path: '/finance/buyout',
              //   name: 'buyout',
              //   component: './Finance/buyout',
              //
              // },
              // {
              //   path: '/finance/buyout/detail/:id',
              //   name: 'detail',
              //   component: './Finance/buyoutOrderDetail',
              //   hideInMenu: true,
              // },
              // {
              //   path: '/finance/purchase',
              //   name: 'purchase',
              //   component: './Finance/purchase',
              //
              // },
              // {
              //   path: '/finance/purchase/purchaseDetail/:id',
              //   name: 'purchaseDetail',
              //   component: './Finance/purchaseDetail',
              //   hideInMenu: true,
              // },
            ]
          },

          // 权限管理
          {
            path: '/permission',
            name: 'permission',
            icon: 'tool',
            authority: ['权限管理'],
            routes: [
              {
                path: '/permission/index',
                name: 'index',
                component: './Permission/index',
                authority: ['部门列表']
              },
              {
                path: '/permission/index/config/:id',
                name: 'config',
                component: './Permission/PermissionConfig',
                hideInMenu: true
              },
              {
                path: '/permission/member',
                name: 'member',
                component: './Member/index',
                authority: ['成员管理']
              },
              {
                path: '/permission/member/config/:id',
                name: 'config',
                component: './Permission/PermissionConfig',
                hideInMenu: true
              },
              {
                path: '/permission/notice',
                name: 'notice',
                component: './Notice/index',
                authority: ['成员管理']
              },
              {
                path: '/permission/changepw',
                name: 'changepw',
                component: './user/ChangePw',
                authority: ['权限管理']
              }
            ]
          },
          // 配置管理
          {
            path: '/configure',
            name: 'configure',
            icon: 'setting',
            authority: ['配置管理'],
            routes: [
              {
                path: '/configure/index',
                name: 'index',
                component: './Configure/index',
                authority: ['首页配置']
              },
              {
                path: '/configure/appConfigure',
                name: 'AppConfigure',
                component: './Configure/appConfigure',
                authority: ['APP管理']
              },
            ]
          },
          {
            component: './404'
          }
        ]
      },
      {
        component: './404'
      }
    ]
  },
  {
    component: './404'
  }
]
